#include "MatGraph.cpp"		//包含邻接矩阵的基本运算函数
int main() {
    MatGraph g;
    int n = 5, e = 7, i;
    int A[MAXVEX][MAXVEX] = {
        {0, 1, 2, 6, INF}, 
        {INF, 0, INF, 4, 5}, 
        {INF, INF, 0, INF, 3}, 
        {INF, INF, INF, 0, INF}, 
        {INF, INF, INF, 7, 0}};

    CreateGraph(g, A, n, e);	//建立图7.4图的邻接矩阵
    printf("图G的邻接矩阵:\n");
    DispMatGraph(g);
    printf("图G的邻接表:\n");
    DispAdjGraph(g);
    
    DestroyGraph(g);
}

